<template>
    <h3>组件事件</h3>
    <p>{{msg}}</p>
    <Child @someEvent="getchild"/>
</template>
<script>
import Child from './Child.vue'
export default{
    data(){
        return{
            msg:''
        }
    },
    methods:{
        getchild(childdata){
            console.log('触发了父方法',childdata);
            console.log(childdata);
            this.msg = childdata

        }

    },
    components:{
        Child
    }
}
</script>